graph TD
    subgraph Frontend_UI["前端用户界面"]
        A["用户操作: 填写表单"] --> B{"Vue 组件: employee/index.vue"};
    end

    subgraph Frontend_Logic["前端逻辑与API调用"]
        B -- "submitForm()" --> C["Vue 组件: 表单验证"];
        C -- "验证通过" --> D{"API 调用: employee.js"};
        D -- "addEmployee()" --> E["请求工具: request.js"];
    end

    subgraph Network_Proxy["网络代理层 (仅开发环境)"]
        E -- "HTTP Request (带/dev-api)" --> F["Vite 开发服务器"];
        F -- "代理转发 (移除 /dev-api)" --> G["实际发送到后端 HTTP Request"];
    end

    subgraph Backend_Control["后端控制器层"]
        G -- "POST /system/employee" --> H["FastAPI 控制器: employee_controller.py"];
        H -- "请求体解析/验证 (EmployeeModel)" --> I{"用户认证 (JWT)"};
        I -- "认证通过" --> J["控制器: 填充创建/更新时间/操作人"];
    end

    subgraph Backend_Service_DAO["后端服务与数据访问层"]
        J -- "调用服务层" --> K["服务层: employee_service.py"];
        K -- "调用 DAO 层" --> L["DAO 层: employee_dao.py"];
        L -- "数据组装 (ORM)" --> M["数据库: employee_info 表 (DO)"];
        M -- "SQL INSERT" --> N["数据库操作"];
    end

    subgraph Backend_Response["后端响应构建"]
        O["DAO 层返回结果"];
        P["服务层返回结果"];
        Q["控制器: 构建 JSON 响应"];
        R["响应发送"];

        N -- "数据库操作结果 (成功/失败)" --> O;
        O --> P;
        P --> Q;
        Q -- "HTTP Response" --> R;
    end

    subgraph Frontend_Response_Handling["前端响应处理"]
        S["请求工具: request.js (响应拦截器)"];
        T{"Vue 组件: 消息提示 (ElMessage)"};
        U["Vue 组件: 关闭新增对话框"];
        V["Vue 组件: 刷新员工列表"];

        R -- "HTTP Response" --> S;
        S -- "响应拦截/错误处理" --> T;
        T --> U;
        U --> V;
    end

    style Frontend_UI fill:#f9f,stroke:#333,stroke-width:2px;
    style Frontend_Logic fill:#ccf,stroke:#333,stroke-width:2px;
    style Network_Proxy fill:#dfd,stroke:#333,stroke-width:2px;
    style Backend_Control fill:#ffd,stroke:#333,stroke-width:2px;
    style Backend_Service_DAO fill:#add,stroke:#333,stroke-width:2px;
    style Backend_Response fill:#ddf,stroke:#333,stroke-width:2px;
    style Frontend_Response_Handling fill:#fdd,stroke:#333,stroke-width:2px;

    click B "flux-frontend/src/views/system/employee/index.vue"
    click D "flux-frontend/src/api/system/employee.js"
    click E "flux-frontend/src/utils/request.js"
    click F "flux-frontend/vite.config.js"
    click H "flux-backend/module_admin/controller/employee_controller.py"
    click K "flux-backend/module_admin/service/employee_service.py"
    click L "flux-backend/module_admin/dao/employee_dao.py"
    click M "flux-backend/module_admin/entity/do/employee_do.py" 